package com.nefu.softlab.xjwc.mapper;

import com.nefu.softlab.xjwc.model.Activity;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author LiXiwen
 * @date 2020/2/7 21:10
 */
@Mapper
@Repository
public interface ActivityMapper {
    /**
     * 添加一个活动
     * @param activity
     * @return
     */
    boolean addActivity(Activity activity);

    /**
     * 条件查询所有活动
     * @return
     */
    List<Activity> selectAllActivity(Activity activity);

    /**
     * 更新活动
     * @param activity
     * @return
     */
    boolean updateActivity(Activity activity);

    /**
     * 删除活动
     * @param activity
     * @return
     */
    boolean deleteActivity(Activity activity);


    /**
     * 根据项目id查询活动信息
     * @param projectId
     * @return
     */
    List<Activity> selectActivityByProjectId(Integer projectId);


    List<Integer> selectAllActivityId();

}
